import {request} from './request'
import {User} from './login'

// export function list(pageSize,pageNum) {
//   return request({
//     url: '/model/sysUser/list',
//     method: "get",
//     params:{
//       pageSize,pageNum
//     }
//   })
// }
export function getlist(user, pageSize, pageNum) {
  // const u = new User(user)
  // console.log(user);
  // console.log(u);
  return request({
    url: '/model/sysUser/list',
    method: "post",
    params: {
      pageSize, pageNum
    },
    data: new User(user)
  })
}

export function deleteList(list) {
  const idList = list
  console.log(list + '===========');
  return request({
    url: '/model/sysUser/delete',
    method: "post",
    data: idList
  })
}


export function update(user) {
  const u = new User(user)
  console.log(user);
  console.log(u);
  return request({
    url: '/model/sysUser/update/'+u.id,
    method: "post",
    data: u
  })
}
